from nonebot import on_command, CommandSession
#import argparse
from .get_baidu import get_hots
#import nonebot.argparse

@on_command('bdhots',aliases=['百度榜','百度热榜'])
async def _bdhots(session: CommandSession):
    ret = get_hots()
    results = ''
    for i in ret:
        results = results + i + '\n'

    await session.finish(results)
    # parser = argparse.ArgumentParser(session=session)
    # parser.add_argument('tick',default='top')

    # args = parser.parse_args
    # MK = args.tick
    # if MK == 'top':
    #     for i in range(10):
    #         results += ret[i]
    #     await session.finish(results)
    # else:
    #     for i in ret:
    #         results += i+'\n'
    #    await session.finish(results)
    